-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Rx f low #20731
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Rx f low #20731
Conversation
CI InformationTo view the history of this post, clich the 'edited' button above Inputs:Sources:sdk-nrf: PR head: eb9018bfd298c4fda423fab402454d8981c29ed9 more detailssdk-nrf:
Github labels
List of changed files detected by CI (8)Outputs:ToolchainVersion: 4ffa2202d5 Test Spec & Results: ✅ Success; ❌ Failure; 🟠 Queued; 🟡 Progress; ◻️ Skipped;
|
|
You can find the documentation preview for this PR here. |
3b6d9cf to
3a72ed1
Compare
7d6bc30 to
27c9038
Compare
22b33e4 to
3970be6
Compare
3d7957c to
2499e70
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
reviewed during meeting
5278151 to
6b7ac9f
Compare
2b7e509 to
f160adf
Compare
include/drivers/mspi/nrfe_mspi.h
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not sure if this will work correctly without the __packed attribute on every compiler.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
changed opcode to be uint32_t
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
cnahged nrfe_mspi_opcode_t size to 32 bits
drivers/mspi/mspi_nrfe.c
Outdated
| .user_data = NULL, | ||
| .flags = 0, | ||
| .ticks = counter_us_to_ticks(flpr_fault_timer, CONFIG_MSPI_NRFE_FAULT_TIMEOUT) | ||
| .ticks = counter_us_to_ticks(flpr_fault_timer, CONFIG_MSPI_NRFE_FAULT_TIMEOUT), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Don't use auto formatting on the whole file. Only use it on the parts of the file that you have changed.
-> The rule is to not add such unnecessary changes to the PR. In the long run it disrupts/makes it harder to merge the whole file with the code of others.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
fixed
include/drivers/mspi/nrfe_mspi.h
Outdated
| nrfe_mspi_opcode_t opcode; /* Same as application's request. */ | ||
| unsigned reserved : 24; /* Reserved to ensure proper alignment of data field. */ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| nrfe_mspi_opcode_t opcode; /* Same as application's request. */ | |
| unsigned reserved : 24; /* Reserved to ensure proper alignment of data field. */ | |
| nrfe_mspi_opcode_t opcode : 32; /* Same as application's request. */ |
What about this?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this does not compile
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I confirm, it does not compile due to the added short-enums compiler flag. Another solution is to use a union. This is a transparent solution, and it causes the field size to be correct and the data is shifted by 32 bits.
typedef struct {
union {
nrfe_mspi_opcode_t opcode; /* Same as application's request. */
unsigned : 32;
};
uint8_t data;
} nrfe_mspi_flpr_response_msg_t;
But I think the least intrusive thing to do would be to simply add the value NRFE_MSPI_OPCODES_MAX = 0xFFFFFFFF at the end of nrfe_mspi_opcode_t, which would force the enum size to 32bits.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
fixed using this solution: NRFE_MSPI_OPCODES_MAX = 0xFFFFFFFF
dac73d9 to
de9df28
Compare
applications/sdp/mspi/src/hrt/hrt.c
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Needs default.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Changed switch to for
applications/sdp/mspi/src/hrt/hrt.c
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| penultimate_word = (penultimate_word >> (penultimate_word_shift)) | | |
| penultimate_word = (penultimate_word >> penultimate_word_shift) | |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
fixed
applications/sdp/mspi/src/hrt/hrt.c
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can be only declared here and defined later?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
fixed
applications/sdp/mspi/src/hrt/hrt.c
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| * counter stops 1 clock to early. | |
| * counter stops 1 clock too early. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
fixed
applications/sdp/mspi/src/main.c
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please add comments describing those defines.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
fixed
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we can limit the max possible freq to 21 MHz on the APP side, but can be left as is for now.
drivers/mspi/mspi_nrfe.c
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please describe in comment how this is different from alignment done above.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
fixed
applications/sdp/mspi/src/main.c
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we can limit the max possible freq to 21 MHz on the APP side, but can be left as is for now.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Overall LGTM, just the recent changes need to be pushed.
0720d3c to
bc42eff
Compare
Modified hrt rx flow to use write function for command, address and dummy cycles. Modified Rx function to work in 32 bit mode instead of 8 bit. Signed-off-by: Michal Frankiewicz <[email protected]>
Modified return buffer alignment. Signed-off-by: Michal Frankiewicz <[email protected]>
Added no copy functionality to RX. Signed-off-by: Michal Frankiewicz <[email protected]>
Added no copy functionality to RX. Signed-off-by: Michal Frankiewicz <[email protected]>
Increased partition size for flipper code. Signed-off-by: Michal Frankiewicz <[email protected]>
Increased partition size for flipper code. Signed-off-by: Michal Frankiewicz <[email protected]>
|



depends on #20602